package com.ruoyi.puyu.mapper;

import java.util.List;
import java.util.Map;

import com.ruoyi.puyu.domain.PuyuCoach;
import org.apache.ibatis.annotations.MapKey;

/**
 * 教练Mapper接口
 * 
 * @author wusongwen
 * @date 2024-05-01
 */
public interface PuyuCoachMapper 
{
    /**
     * 查询教练
     * 
     * @param coachId 教练主键
     * @return 教练
     */
    public PuyuCoach selectPuyuCoachByCoachId(Long coachId);

    /**
     * 查询教练
     *
     * @param userId 用户ID
     * @return 教练
     */
    public PuyuCoach selectPuyuCoachByUserId(Long userId);

    /**
     * 查询教练列表
     * 
     * @param puyuCoach 教练
     * @return 教练集合
     */
    public List<PuyuCoach> selectPuyuCoachList(PuyuCoach puyuCoach);

    /**
     * 查询教练用户列表
     * @return
     */
    @MapKey("userId")
    public List<Map<String, Object>> selectCoachUserList();

    /**
     * 查询教练用户列表
     * @return
     */
    @MapKey("coachId")
    public List<Map<String, Object>> selectCoachList(PuyuCoach puyuCoach);

    /**
     * 查询教练用户列表（含已删除）
     * @param puyuCoach
     * @return
     */
    @MapKey("coachId")
    public List<Map<String, Object>> selectCoachAllList(PuyuCoach puyuCoach);

    /**
     * 新增教练
     * 
     * @param puyuCoach 教练
     * @return 结果
     */
    public int insertPuyuCoach(PuyuCoach puyuCoach);

    /**
     * 修改教练
     * 
     * @param puyuCoach 教练
     * @return 结果
     */
    public int updatePuyuCoach(PuyuCoach puyuCoach);

    /**
     * 批量逻辑删除教练
     * @param coachIds 需要逻辑删除的数据主键集合
     * @return
     */
    public int updatePuyuCoachByCoachIds(Long[] coachIds);

    /**
     * 删除教练
     * 
     * @param coachId 教练主键
     * @return 结果
     */
    public int deletePuyuCoachByCoachId(Long coachId);

    /**
     * 批量删除教练
     * 
     * @param coachIds 需要删除的数据主键集合
     * @return 结果
     */
    public int deletePuyuCoachByCoachIds(Long[] coachIds);
}
